ARG N_V=18.20.8
FROM registry.cn-hangzhou.aliyuncs.com/xiaoyilin/nodejs:${N_V}  AS builder
LABEL author=xiaoyilin
LABEL email=406735078@qq.com
WORKDIR /home/webpack-demo
RUN npm init -y && \
npm i -D  webpack webpack-cli --registry=https://registry.npmmirror.com
CMD ["npm","list","webpack-cli"]

# https://webpack.docschina.org/guides/
# https://webpack.js.org/guides/
# docker build --build-arg N_V=18.20.8 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n18 .
# docker build --build-arg N_V=20.19.5 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n20 .
# docker build --build-arg N_V=22.20.0 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n22 .
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n18
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n20
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n22
# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n18
# docker run --rm -it registry.cn-hangzhou.aliyuncs.com/xiaoyilin/webpack:20250929-n18 bash